package com.wuyou.designPatterns.observer;

/**
 * Main
 *
 * @Date 2024/10/15 17:28
 * @Author 无忧
 */
public class Main {


    public static void main(String[] args) {

        NumberGenerator generator = new RandomNumberGenerator();
        Observer observer1 = new DigitObserver();
        Observer observer2 = new GraphObserver();
        generator.addObserver(observer1);
        generator.addObserver(observer2);
        generator.execute();

    }
}
